package com.danieltoms.gcSync.util;

import net.rim.device.api.i18n.MessageFormat;
import net.rim.device.api.i18n.ResourceBundle;

public class Messages
{
	private static ResourceBundle _resources = null;

	public Messages(long bundleId, String bundleName)
	{
		_resources = ResourceBundle.getBundle(bundleId, bundleName);
	}

	public String getMessage(int key)
	{
		return _resources.getString(key);
	}

	public String getMessage(int key, Object arg1)
	{
		String string =  _resources.getString(key);
		return MessageFormat.format(string, new Object[] {arg1});
	}
	
	public String getMessage(int key, Object arg1, Object arg2)
	{
		String string =  _resources.getString(key);
		return MessageFormat.format(string, new Object[] {arg1,arg2});
	}
}
